Skip to content

fix(tts): align reading position with primary content#378

Merged
codedogQBY merged 5 commits into
mainfrom
feat/tts-visible-range
Jun 7, 2026
Merged

fix(tts): align reading position with primary content#378
codedogQBY merged 5 commits into
mainfrom
feat/tts-visible-range

Conversation

@codedogQBY
Copy link
Copy Markdown
Owner

Summary

  • Bind foliate TTS initialization to the renderer primary content instead of the first preloaded content.
  • Limit desktop and mobile scroll-mode visible TTS extraction to the primary rendered section to avoid reading preloaded chapters.
  • Update mobile paginated visible-range detection to score current renderer range candidates, matching the desktop fallback logic after the foliate update.
  • Regenerate the mobile reader.html bundle from reader.template.html.

Fixes #377.

Validation

  • pnpm --filter app-expo run build:reader
  • pnpm --filter app exec tsc --noEmit --pretty false
  • pnpm --filter core test -- src/tts/playback-cursor.test.ts src/tts/text-utils.test.ts src/tts/edge-tts-metadata.test.ts
  • git diff --check

Notes

  • Full app-expo lint still fails on existing generated ios/Pods podspec formatting noise.
  • Full repo biome check still reports existing unrelated diagnostics in pdf.worker, chat components, command palette, and foliate-js.

@codedogQBY codedogQBY merged commit c5d8d73 into main Jun 7, 2026
@codedogQBY codedogQBY deleted the feat/tts-visible-range branch June 7, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 朗读情况下出现重复句子

1 participant